Product Code Database
Example Keywords: mobile world -television $38-108
   » » Wiki: Camel Case
Tag Wiki 'Camel Case'.
Tag

The writing format camel case (sometimes stylized as camelCase or CamelCase, also known as camel caps or more formally as medial capitals) is the practice of writing phrases without spaces or punctuation and with words. The format indicates the first word starting with either case, then the following words having an initial uppercase letter. Common examples include YouTube,

(2009). 9781429964401, St. Martin's Publishing Group. .
PowerPoint, HarperCollins, FedEx, iPhone, eBay,
(2018). 9781351621861, Routledge. .
and LaGuardia.
(2020). 9780812985719, Random House Publishing Group. .
Camel case is often used as a naming convention in computer programming. It is also sometimes used in online usernames such as JohnSmith, and to make multi-word more legible, for example in promoting EasyWidgetCompany.com.

The more specific terms Pascal case and upper camel case refer to a joined phrase where the first letter of each word is capitalized, including the initial letter of the first word. Similarly, lower camel case (also known as case) requires an initial lowercase letter. Some people and organizations, notably , use the term camel case only for lower camel case, designating Pascal case for the upper camel case. Some programming styles prefer camel case with the first letter capitalized, others not. For clarity, this article leaves the definition of camel case ambiguous with respect to capitalization of the first word, and uses the more specific terms when necessary.

Camel case is distinct from several other styles: , which capitalizes all words but retains the spaces between them; Tall Man lettering, which uses capitals to emphasize the differences between similar-looking product names such as and ; and , which uses interspersed with lowercase letters (sometimes with the first letter capitalized). A combination of snake and camel case (identifiers Written_Like_This) is recommended in the Ada 95 style guide.


Variations and synonyms
The practice has various names, including:

  • camelBack (or camel-back) notation C# Coding Standards and Guidelines at Purdue University College of Technology or CamelCaps
  • camel case or CamelCase
  • CapitalizedWords or CapWords for upper camel case in Python Style Guide for Python Code at www.python.org
  • compoundNames
  • Embedded caps (or embedded capitals)
  • HumpBack (or hump-back) notation ASP Naming Conventions , by Nannette Thacker (05/01/1999)
  • InterCaps or intercapping
    (2025). 9780195176339, Oxford University Press. .
    (abbreviation of Internal Capitalization)
  • , recommended by the Oxford English Dictionary
  • mixedCase for lower camel case in Python
  • PascalCase for upper camel case (after the Pascal programming language)
  • case
  • WikiWord or WikiCase (especially in older )


History
The earliest known occurrence of the term "InterCaps" on Usenet is in an April 1990 post to the group alt.folklore.computers by Avi Rappoport. The earliest use of the name "Camel Case" occurs in 1995, in a post by Newton Love. Love has since said, "With the advent of programming languages having these sorts of constructs, the humpiness of the style made me call it HumpyCase at first, before I settled on CamelCase. I had been calling it CamelCase for years. ... The citation above was just the first time I had used the name on USENET." The term "Pascal Case" was coined in design discussions for the .NET Framework, first released in 2002.


Traditional use in natural language

In word combinations
The use of medial capitals as a convention in the regular spelling of everyday texts is rare, but is used in some languages as a solution to particular problems which arise when two words or segments are combined.

In Italian, pronouns can be suffixed to verbs, and because the honorific form of second-person pronouns is capitalized, this can produce a sentence like non ho trovato il tempo di risponderLe ("I have not found time to answer you" – where Le means "to you").

In German, many nouns denoting people lack a gender-neutral form, which is why often, especially colloquially, the male form of a noun is used generically to address everyone, regardless of their gender (this is called generisches Maskulinum in German). Another, more recent approach is using the medial capital letter I, called , in written text for words like StudentInnen ("students") to indicate that both Studenten ("male students") and Studentinnen ("female students") are referred to simultaneously. However, mid-word capitalization does not conform to the German orthography prescribed by the Rat für deutsche Rechtschreibung (Council for German Orthography) apart from proper names like McDonald. In order to adhere to orthography, the introductory “students” example could be corrected using to Student(inn)en, which is analogous to writing "congress(wo)men" in English.

(2025). 9783411040971, Bibliographisches Institut.

In Irish, camel case is used when an inflectional prefix is attached to a proper noun, for example i nGaillimh ("in "), from Gaillimh ("Galway"); an tAlbanach ("the Scottish person"), from Albanach ("Scottish person"); and go hÉirinn ("to Ireland"), from Éire ("Ireland"). In recent Scottish Gaelic orthography, a hyphen has been inserted: an t-Albannach.

This convention of inflectional prefix is also used by several written (e.g. isiZulu, "") and several indigenous languages of Mexico (e.g. Nahuatl, Totonacan, Mixe–Zoque, and some Oto-Manguean languages).

In , when capitalizing the digraph ij, both the letter I and the letter J are capitalized, for example in the country name ("Iceland").

In , camel case is sometimes used for place names so that readers can more easily pick out the different parts of the name. For example, places like Beijing (北京), Qinhuangdao (秦皇岛), and Daxing'anling (大兴安岭) can be written as BeiJing, QinHuangDao, and DaXingAnLing respectively , with the number of capital letters equaling the number of Chinese characters. Writing word compounds only by the initial letter of each character is also acceptable in some cases, so Beijing can be written as BJ, Qinghuangdao as QHD, and Daxing'anling as DXAL.

In English, medial capitals are usually only found in Scottish or Irish "Mac-" or "Mc-" patronymic names, where for example MacDonald, McDonald, and Macdonald are common spelling variants of MacDonald (son of Dòmhnall), and in Anglo-Norman "Fitz-" names, where for example both FitzGerald and Fitzgerald (son of Gerald) are found.

In their English style guide The King's English, first published in 1906, H. W. and F. G. Fowler suggested that medial capitals could be used in triple where would cause ambiguity—the examples they give are KingMark-like (as against King Mark-like) and Anglo-SouthAmerican (as against Anglo-South American). However, they described the system as "too hopelessly contrary to use at present".

Some French names also uses CamelCase names, such as LeBeau (surname), , , and Italian names /DeRosa.


In transliterations
In the scholarly transliteration of languages written in other scripts, medial capitals are used in similar situations. For example, in transliterated , haIvri means "the Hebrew person" or "the Jew" and b'Yerushalayim means "in Jerusalem". In proper names like rLobsang, the "r" stands for a prefix glyph in the original script that functions as tone marker rather than a normal letter. Another example is tsIurku, a Latin transcription of the term for the capping stone of the characteristic Medieval defensive towers of and ; the letter "I" () is not actually capital, denoting a distinct from the one transcribed as "i".


In abbreviations
Medial capitals are traditionally used in abbreviations to reflect the capitalization that the words would have when written out in full, for example in the academic titles PhD or BSc. A more recent example is , a contraction of National Novel Writing Month and the designation for both the annual event and the nonprofit organization that runs it. In German, the names of statutes are abbreviated using embedded capitals, e.g. StGB for (Criminal Code), PatG for Patentgesetz (Patent Act), BVerfG for Bundesverfassungsgericht (Federal Constitutional Court), or the very common GmbH, for Gesellschaft mit beschränkter Haftung (private limited company). In this context, there can even be three or more camel case capitals, e.g. in TzBfG for Teilzeit- und Befristungsgesetz (Act on Part-Time and Limited Term Occupations). In French, camel case acronyms such as (1960) were favored for a time as alternatives to initialisms.

Camel case is often used to transliterate initialisms into alphabets where two letters may be required to represent a single character of the original alphabet, e.g., from ДШК.


History of modern technical use

Chemical formulas
The first systematic and widespread use of medial capitals for technical purposes was the notation for chemical formulas invented by the Swedish chemist Jacob Berzelius in 1813. To replace the multitude of naming and symbol conventions used by chemists until that time, he proposed to indicate each chemical element by a symbol of one or two letters, the first one being capitalized. The capitalization allowed formulas like "" to be written without spaces and still be parsed without ambiguity.Jöns Jacob Berzelius (1813). Essay on the Cause of Chemical Proportions and on Some Circumstances Relating to Them: Together with a Short and Easy Method of Expressing Them. Annals of Philosophy 2, 443-454, 3, 51-52; (1814) 93-106, 244-255, 353-364.Henry M. Leicester & Herbert S. Klickstein, eds. 1952, A Source Book in Chemistry, 1400-1900 (Cambridge, MA: Harvard)

Berzelius' system continues to be used, augmented with three-letter symbols such as "" for unconfirmed or unknown elements and abbreviations for some common substituents (especially in the field of organic chemistry, for instance "" for "ethyl-"). This has been further extended to describe the sequences of and other similar domains.


Early use in trademarks
Since the early 20th century, medial capitals have occasionally been used for names and product trademarks, such as
  • DryIce Corporation (1925) marketed the solid form of (CO2) as "Dry Ice", thus leading to its common name.
    (2025). 9781598880915, United States Trademark Association.
  • and , rival movie formats (1953)
  • ShopKo (1962), retail stores, later renamed Shopko
  • MisteRogers Neighborhood, the TV series also called Mister Rogers' Neighborhood (1968)
  • ChemGrass (1965), later renamed (1967)
  • ConAgra (1971), formerly Consolidated Mills
  • (1968), a sports boat manufacturer
  • (1971)
  • (1972), formerly Grammophon-Philips Group
  • United HealthCare (1977)
  • (1979), formerly Master Charge
  • (1979)


Computer programming
In the 1970s and 1980s, medial capitals were adopted as a standard or alternative naming convention for multi-word identifiers in several programming languages. The precise origin of the convention in computer programming has not yet been settled. A 1954 conference proceedings occasionally informally referred to 's system as "SpeedCo". Christopher Strachey's paper on GPM (1965), shows a program that includes some medial capital identifiers, including "NextCh" and "WriteSymbol" (This was most likely the influence of the CPL language, of which Strachey was one of the designers)

Multiple-word descriptive identifiers with embedded spaces such as end of file or char table cannot be used in most programming languages because the spaces between the words would be as between tokens. The alternative of running the words together as in endoffile or chartable is difficult to understand and possibly misleading; for example, chartable is an English word (able to be charted), whereas charTable means a table of chars .

Some early programming languages, notably Lisp (1958) and (1959), addressed this problem by allowing a ("-") to be used between words of compound identifiers, as in "END-OF-FILE": Lisp because it worked well with prefix notation (a Lisp parser would not treat a hyphen in the middle of a symbol as a subtraction operator) and COBOL because its operators were individual English words. This convention remains in use in these languages, and is also common in program names entered on a , as in Unix.

However, this solution was not adequate for mathematically oriented languages such as (1955) and ALGOL (1958), which used the hyphen as an infix subtraction operator. FORTRAN ignored blanks altogether, so programmers could use embedded spaces in variable names. However, this feature was not very useful since the early versions of the language restricted identifiers to no more than six characters.

Exacerbating the problem, common character sets of the time were uppercase only and lacked other special characters. It was only in the late 1960s that the widespread adoption of the character set made both lowercase and the character _ universally available. Some languages, notably C, promptly adopted underscores as word separators, and identifiers such as end_of_file are still prevalent in C programs and libraries (as well as in later languages influenced by C, such as and Python). However, some languages and programmers chose to avoid underscores and adopted camel case instead.

, who worked at in the 1970s and later oversaw the creation of Microsoft's Office suite of applications, invented and taught the use of Hungarian Notation, one version of which uses the lowercase letter(s) at the start of a (capitalized) variable name to denote its type. One account claims that the camel case style first became popular at Xerox PARC around 1978, with the Mesa programming language developed for the computer. This machine lacked an underscore key (whose place was taken by a left arrow "←"), and the hyphen and space characters were not permitted in identifiers, leaving camel case as the only viable scheme for readable multiword names. The PARC Mesa Language Manual (1979) included a coding standard with specific rules for upper and lower camel case that was strictly followed by the Mesa libraries and the Alto operating system. , the inventor of Pascal, came to appreciate camel case during a sabbatical at PARC and used it in , his next programming language.

(2025). 9781595937667

The language, which was developed originally on the Alto, also uses camel case instead of underscores. This language became quite popular in the early 1980s, and thus may also have been instrumental in spreading the style outside PARC.

Upper camel case (or "Pascal case") is used in in computer algebraic system for predefined identifiers. User defined identifiers should start with a lower case letter. This avoids the conflict between predefined and user defined identifiers both today and in all future versions.

C# variable names are recommended to follow the lower camel case convention.


Computer companies and products
Whatever its origins in the computing field, the convention was used in the names of computer companies and their commercial brands, since the late 1970s — a trend that continues to this day:


Spread to mainstream usage
In the 1980s and 1990s, after the advent of the personal computer exposed hacker culture to the world, camel case then became fashionable for corporate in non-computer fields as well. Mainstream usage was well established by 1990:

  • (1980) EchoStar
  • (1984)
  • (1985)
  • (1986)
  • (1990) HarperCollins, SeaTac
  • (1998) PricewaterhouseCoopers, merger of Price Waterhouse and Coopers

During the of the late 1990s, the lowercase prefixes "e" (for "") and "i" (for "Internet", "information", "", etc.) became quite common, giving rise to names like Apple's and the software platform.

In 1998, Dave Yost suggested that chemists use medial capitals to aid readability of long chemical names, e.g. write AmidoPhosphoRibosylTransferase instead of amidophosphoribosyltransferase. Feedback, 20 June 1998 Vol 158 No 2139 20 June 1998 This usage was not widely adopted.

Camel case is sometimes used for abbreviated names of certain neighborhoods, e.g. New York City neighborhoods SoHo ( South of Houston Street) and TriBeCa ( Triangle Below Canal Street) and San Francisco's SoMa ( South of Market). Such usages erode quickly, so the neighborhoods are now typically rendered as Soho, Tribeca, and Soma.

Internal capitalization has also been used for other technical codes like (1983).


Current usage in computing

Programming and coding
The use of medial caps for compound identifiers is recommended by the guidelines of many organizations or software projects. For some languages (such as Mesa, Pascal, , Java and 's .NET) this practice is recommended by the language developers or by authoritative manuals and has therefore become part of the language's "culture".

Style guidelines often distinguish between upper and lower camel case, typically specifying which variety should be used for specific kinds of entities: variables, record fields, methods, procedures, functions, , types, etc. These rules are sometimes supported by static analysis tools that check for adherence.

The original Hungarian notation for programming, for example, specifies that a lowercase abbreviation for the "usage type" (not data type) should prefix all variable names, with the remainder of the name in upper camel case; as such it is a form of lower camel case.

Programming identifiers often need to contain acronyms and initialisms that are already in uppercase, such as "old HTML file". By analogy with the title case rules, the natural camel case rendering would have the abbreviation all in uppercase, namely "oldHTMLFile". However, this approach is problematic when two acronyms occur together (e.g., "parse DBM XML" would become "parseDBMXML") or when the standard mandates lower camel case but the name begins with an abbreviation (e.g. "SQL server" would become "sQLServer"). For this reason, some programmers prefer to treat abbreviations as if they were words and write "oldHtmlFile", "parseDbmXml" or "sqlServer". However, this can make it harder to recognize that a given word is intended as an acronym.

Difficulties arise when identifiers have different meaning depending only on the case, as can occur with mathematical functions or trademarks. In this situation changing the case of an identifier might not be an option and an alternative name need be chosen.


Wiki link markup
Camel case is used in some for terms that should be automatically linked to other pages. This convention was originally used in 's original , ,Andrew Lih, The Wikipedia Revolution: How a Bunch of Nobodies Created the World's Greatest Encyclopedia (New York: Hyperion, 2009), pp. 57–58. and can be activated in most other wikis. Some wiki engines such as , and make use of it in the default settings, but usually also provide a configuration mechanism or plugin to disable it. Wikipedia formerly used camel case linking as well, but switched to explicit link markup using Lih, The Wikipedia Revolution, pp. 62–63, 67. and many other wiki sites have done the same. , for example, camel case for linking. Some wikis that do not use camel case linking may still use the camel case as a naming convention, such as .


Other uses
The NIEM registry requires that data elements use upper camel case and XML attributes use lower camel case.

Most popular command-line interfaces and languages cannot easily handle file names that contain embedded spaces (usually requiring the name to be put in quotes). Therefore, users of those systems often resort to camel case (or underscores, hyphens and other "safe" characters) for compound file names like MyJobResume.pdf.


Social media accessibility
and social networking services that limit the number of characters in a message are potential outlets for medial capitals. Using camel case between words reduces the number of spaces, and thus the number of characters, in a given message, allowing more content to fit into the limited space. , especially long ones, often use camel case to maintain readability (e.g. #CollegeStudentProblems is easier to read than #collegestudentproblems); this practice improves as recognize CamelCase in parsing composite hashtags.

In website URLs, spaces are as "%20", making the address longer and less . By omitting spaces, camel case does not have this problem.


Readability studies
Camel case has been criticized as negatively impacting readability due to the removal of spaces and uppercasing of every word.

A 2009 study of 135 subjects comparing (underscored identifiers) to camel case found that camel case identifiers were recognized with higher accuracy among all subjects. Subjects recognized snake case identifiers more quickly than camel case identifiers. Training in camel case sped up camel case recognition and slowed snake case recognition, although this effect involved coefficients with high . The study also conducted a subjective survey and found that non-programmers either preferred underscores or had no preference, and 38% of programmers trained in camel case stated a preference for underscores. However, these preferences had no statistical correlation to accuracy or speed when controlling for other variables.

A 2010 follow-up study used a similar study design with 15 subjects consisting of expert programmers trained primarily in snake case. It used a static rather than animated stimulus and found perfect accuracy in both styles except for one incorrect camel case response. Subjects recognized identifiers in snake case more quickly than camel case. The study used eye-tracking equipment and found that the difference in speed for its subjects was primarily due to the fact that average duration of fixations for camel-case was significantly higher than that of snake case for 3-part identifiers. The survey recorded a mixture of preferred identifier styles but again there was no correlation of preferred style to accuracy or speed.

(2025). 9781424476046, IEEE.


See also

External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs